﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MadPropsDemo.Tests
{
    public class FakeDialogService : MadPropsDemo.DialogService
    {
        public int TimesCalled;
        public CommonDialog CapturedDialog;
        public DialogResult ReturnValue;
        public Action<CommonDialog> OnCalled;
        public override DialogResult ShowDialog(CommonDialog dialog)
        {
            TimesCalled++;
            if (OnCalled != null)
            {
                OnCalled(dialog);
            }
            CapturedDialog = dialog;
            return ReturnValue;
        }
    }
}
